﻿function MyAlert(title, Content, Btntext, Success)
{
    var marr = new Array;
    marr.push("<div class='modal fade' id='myModal' tabindex='-1' role='dialog' data-dismiss='modal' aria-labelledby='myModalLabel' aria-hidden='true'>");
    marr.push('<div class="modal-dialog">');
    marr.push('<div class="modal-content">');
    marr.push('<div class="modal-header">');
    marr.push('<button type="button" class="close"');
    marr.push('data-dismiss="modal" aria-hidden="true">');
    marr.push('&times;');
    marr.push('</button>');
    marr.push('<h4 class="modal-title" id="myModalLabel">');
    marr.push(title);
    marr.push('</h4>');
    marr.push('</div>');
    marr.push('<div class="modal-body">');
    marr.push(Content);
    marr.push('</div>');
    marr.push('<div class="modal-footer">');
    marr.push('<button type="button" class="btn btn-default"');
    marr.push('data-dismiss="modal">');
    marr.push(Btntext);
    marr.push('</button>');
    marr.push('</div></div></div></div>');
    $("body").append(marr.join(""));
    $("#myModal").modal();
    if (Success) {
        $("#myModal").on("hidden.bs.modal", function () { location.href = '/MyAccount/MyAccountIndex' })
    }

}